#!/usr/bin/env php
<?php
	if (count($argv) <= 1) {
		$content = file_get_contents("php://stdin");

	} else {
		$request = $argv[1];
		if (preg_match("/^http/", $request) || !preg_match("/^(\{|\[)/", $request)) {
			$content = file_get_contents($request);
		} else {
			$content = $request;
		}

	}

	print_r(json_decode($content));
?>
